package com.be.beadmin.project.entity;

import com.be.beadmin.common.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;


/**
* @website
* @description 项目信息
* @author zmy
* @date 2023-01-12
**/
@Entity
@Getter
@Setter
@Table(name="T_PM_Info")  // 表名
public class Info extends  BaseEntity {

    @Column(name = "SerialNo",columnDefinition = "VARCHAR(50) COMMENT '流水号'  not null")
    private String serialNo;

    @Column(name = "So",columnDefinition = "VARCHAR(50) COMMENT '销售订单号'")
    private String so;

    @Column(name = "ContractCode",columnDefinition = "VARCHAR(50) COMMENT '合同编码'  not null")
    private String contractCode;

    @Column(name = "ContractName",columnDefinition = "VARCHAR(50) COMMENT '合同名称' ")
    private String contractName;

    @Column(name = "ProjectCode",columnDefinition = "VARCHAR(50) COMMENT '项目编码' ")
    private String projectCode;

    @Column(name = "ProjectName",columnDefinition = "VARCHAR(50) COMMENT '项目名称' not null ", unique = true)
    private String projectName;

    @Column(name = "TeamId",columnDefinition = "VARCHAR(50) COMMENT '团队id'")
    private String teamId;

    @Column(name = "CustomerCode",columnDefinition = "VARCHAR(50) COMMENT '客户编码'")
    private String customerCode;

    @Column(name = "CustomerName",columnDefinition = "VARCHAR(50) COMMENT '客户名称'")
    private String customerName;

    @Column(name = "CustomerAddress",columnDefinition = "VARCHAR(200) COMMENT '客户地址'")
    private String customerAddress;

    @Column(name = "ContactName",columnDefinition = "VARCHAR(50) COMMENT '联系人'")
    private String contactName;

    @Column(name = "ContactNo",columnDefinition = "VARCHAR(50) COMMENT '联系电话'")
    private String contactNo;

    @Column(name = "DeliveryAddress",columnDefinition = "VARCHAR(200) COMMENT '交货地点'")
    private String deliveryAddress;

    @Column(name = "DeliveryDate",columnDefinition = "datetime COMMENT '交货日期'")
    private Date deliveryDate;
    /**
     * 待审核 0
     * 已发布 1
     * 暂停   2
     * 关闭   3
//     * 完成   4
     *
     */
    @Column(name = "ContractState",columnDefinition = "varchar(50) COMMENT '项目状态'")
    private String contractState ;

    @Column(name = "ContractDate",columnDefinition = "datetime COMMENT '合同日期'")
    private Date contractDate;

    @Column(name = "ContractAmount",columnDefinition = "VARCHAR(50) COMMENT '合同金额'")
    private String contractAmount;

    @Column(name = "ContractAmountUnit",columnDefinition = "VARCHAR(50) COMMENT '合同金额单位'")
    private String contractAmountUnit;

    @Column(name = "Memo",columnDefinition = "VARCHAR(50) COMMENT '备注'")
    private String memo;

    @Column(name = "Country",columnDefinition = "VARCHAR(20) COMMENT '国家'")
    private String country;

    @Column(name = "Province",columnDefinition = "VARCHAR(20) COMMENT '省'")
    private String province;

    @Column(name = "City",columnDefinition = "VARCHAR(20)  COMMENT '市'")
    private String city;

    @Column(name = "Reserved",columnDefinition = "VARCHAR(50) COMMENT '预留' ")
    private String reserved;

    @Column(
            name = "ReviewState",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT '审核状态:0-初始化 待上传 1-待审核 2-审核通过 3-冻结  如有异常直接退回0状态' "
    )
    protected Integer reviewState = 0;

    @Column(name = "ReviewMemo",columnDefinition = "VARCHAR(50) COMMENT '审核备注' ")
    private String reviewMemo;

    @Column(name = "ReviewEditor",columnDefinition = "VARCHAR(50) COMMENT '审核人员' ")
    private String reviewEditor;

    @Column(name = "ReviewFileId",columnDefinition = "VARCHAR(50) COMMENT '审核附件ID' ")
    private String reviewFileId;

    @Column(name = "ReviewTime",columnDefinition = "datetime COMMENT '审核时间' ")
    private Date reviewTime;

    /**
     * ERP接口新加字段
     */
    @Column(name = "soitem", columnDefinition = "VARCHAR(50) COMMENT '销售订单行'")
    private String soitem;



    @Column(name = "sooperatorCode", columnDefinition = "VARCHAR(50) COMMENT '销售负责人'")
    private String sooperatorCode;

    @Column(name = "projectManager", columnDefinition = "VARCHAR(50) COMMENT '项目经理'")
    private String projectManager;

    @Column(name = "cabinetQty", columnDefinition = "INT COMMENT '柜体数量'")
    private Integer cabinetQty;

    @Column(name = "orgCode", columnDefinition = "VARCHAR(50) COMMENT '组织名称'")
    private String orgCode;
}
